package com.sky.service.user.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sky.mapper.merchant.MerchantMapper;
import com.sky.pojo.Merchant;
import com.sky.service.user.MerchantService;
import com.sky.vo.ShopVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * @Author:篍
 * @Date: 2025/08/25 20:34
 * @Description:
 */
@Service
@Slf4j
public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> implements MerchantService {

    @Override
    public ShopVO findShopById(Long id) {
        Merchant merchant = this.getById(id);
        ShopVO shopVO = new ShopVO();
        shopVO.setId(merchant.getId());
        shopVO.setPhone(merchant.getShopTelephone());
        shopVO.setShopAddress(merchant.getShopAddress());
        shopVO.setShopName(merchant.getShopName());
        return shopVO;
    }
}
